﻿@model IEnumerable<MusicHouse.Models.Prototipo.ListaCesta>

@{
    ViewBag.Title = "ListaCesta";
    Layout = "~/Views/Shared/_LayoutPrototipo.cshtml";
}

<h2>Carrinho de Serviços</h2>

<table summary="This table includes examples of as many table elements as possible" width="95%">
    <caption>Lista de Serviços</caption>
    <thead>
        <tr>
            <th colspan="5">
                Lista de Itens do Carrinho
            </th>
        </tr>
        <tr>
            <th>Item No.</th>
            <th>Nome da Música</th>
            <th>Serviço</th>
            <th>Arquivo</th>
            <th>Valor</th>        
        </tr>
    </thead>
    
    <tbody>
@foreach (var item in Model) {
    <tr>
        <td align="center">@Html.DisplayFor(modelItem => item.IdItem)</td>
        <td>@Html.DisplayFor(modelItem => item.NomeMusica)</td>
        <td>@Html.DisplayFor(modelItem => item.TipoServico.Descricao) </td>
        <td>@if (item.TipoServico.Id == 1)
            { @Html.ActionLink("Icone de download", item.NomeArquivo) }</td>
        <td>@Html.DisplayFor(modelItem => item.Valor)</td>
    </tr>
}
    </tbody>

    <tfoot>
        <tr>
            <th></th>
            <th></th>
            <th></th>
            <th>Total</th>
            <th>@ViewBag.TotalValor.ToString("#0.00")</th>
        </tr>
    </tfoot>

</table>

@using (Html.BeginForm())
{
    <div class="grid_4"><p>@Html.ActionLink("Continuar comprando","Index")</p></div>
    <div class="grid_4"><p>@Html.ActionLink("Finalizar", "Index")</p></div>
}
